package cisdi.mes.sm.rm.domain;

import java.io.Serializable;
import javax.persistence.*;

import org.codehaus.jackson.map.annotate.JsonSerialize;

import java.util.Date;
import cisdi.mes.utils.base.CustomDateSerializer;


/**
 * The persistent class for the SM_RM_STORAGE_CONTENT database table.
 * 
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert=true, dynamicUpdate=true)
@Table(name="SM_RM_STORAGE_CONTENT")
public class SmRmStorageContent implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="SM_RM_STORAGE_CONTENT_CONTENTID_GENERATOR", sequenceName="SEQ_SM",allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SM_RM_STORAGE_CONTENT_CONTENTID_GENERATOR")
	@Column(name="CONTENT_ID")
	private long contentId;


	@Column(name="MATERIAL_DESC")
	private String materialDesc;

	@Column(name="MATERIAL_ID")
	private String materialId;	

	@Column(name="MEASURE_ID")
	private String measureId;
	
	@Column(name="QUALITY_BATCH")
	private String qualityBatch;

	@Column(name="STORAGE_ID")
	private String storageId;

	@JsonSerialize(using = CustomDateSerializer.class)
	@Temporal( TemporalType.TIMESTAMP)
	@Column(name="TIME_STAMP")
	private Date timeStamp;

	private Double weight;
	
	@Column(name="FROM_CONTENT_ID")
	private Long fromContentId;
	
	@Column(name="FROM_STORAGE_ID")
	private String fromStorageId;
	
	@Temporal( TemporalType.TIMESTAMP)
	@Column(name="FROM_TIME_STAMP")
	private Date fromTimeStamp;

    public SmRmStorageContent() {
    }

	public long getContentId() {
		return this.contentId;
	}

	public void setContentId(long contentId) {
		this.contentId = contentId;
	}


	public String getMaterialDesc() {
		return this.materialDesc;
	}

	public void setMaterialDesc(String materialDesc) {
		this.materialDesc = materialDesc;
	}

	public String getMaterialId() {
		return this.materialId;
	}

	public void setMaterialId(String materialId) {
		this.materialId = materialId;
	}

	public String getMeasureId() {
		return this.measureId;
	}

	public void setMeasureId(String measureId) {
		this.measureId = measureId;
	}

	public String getStorageId() {
		return this.storageId;
	}

	public void setStorageId(String storageId) {
		this.storageId = storageId;
	}

	public Date getTimeStamp() {
		return this.timeStamp;
	}

	public void setTimeStamp(Date timeStamp) {
		this.timeStamp = timeStamp;
	}

	public Double getWeight() {
		return this.weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	public String getQualityBatch() {
		return qualityBatch;
	}

	public void setQualityBatch(String qualityBatch) {
		this.qualityBatch = qualityBatch;
	}

	public String getFromStorageId() {
		return fromStorageId;
	}

	public void setFromStorageId(String fromStorageId) {
		this.fromStorageId = fromStorageId;
	}

	public Long getFromContentId() {
		return fromContentId;
	}

	public void setFromContentId(Long fromContentId) {
		this.fromContentId = fromContentId;
	}

	public Date getFromTimeStamp() {
		return fromTimeStamp;
	}

	public void setFromTimeStamp(Date fromTimeStamp) {
		this.fromTimeStamp = fromTimeStamp;
	}

}